<template>
  <el-dialog v-if="dialogVisiable" v-model="dialogVisiable" title="运行日志" width="1000px">
    <el-table :data="tableDatas">
      <el-table-column prop="algorithmName" label="算法名" width="200px" show-overflow-tooltip></el-table-column>
      <el-table-column prop="log" label="错误日志" show-overflow-tooltip></el-table-column>
    </el-table>
    <template #footer>
      <div class="dialog-footer">
        <el-button @click="closeDialog">关闭</el-button>
      </div>
    </template>
  </el-dialog>
</template>

<script setup name="RunLogDialog" lang="ts">
import { taskLogList } from '@/api/loadProcessingAlgorithm/loadTaskManagement/index';
const dialogVisiable = ref(false);
const tableDatas = ref([]);
const closeDialog = () => {
  dialogVisiable.value = false;
};
const openDialog = async (id) => {
  const obj = {
    loadExperimentId: id
  };
  const res = await taskLogList(obj);
  tableDatas.value = res.rows;
  dialogVisiable.value = true;
};
defineExpose({
  openDialog
});
</script>

<style></style>
